function deepMerge(target, source) {
  if (typeof target !== 'object' || target === null) return source;
  if (typeof source !== 'object' || source === null) return target;

  const merged = Array.isArray(target) ? [...target] : { ...target };

  Object.keys(source).forEach(key => {
    if (typeof source[key] === 'object' && source[key] !== null) {
      if (!merged[key]) {
        merged[key] = Array.isArray(source[key]) ? [] : {};
      }
      merged[key] = deepMerge(merged[key], source[key]);
    } else {
      merged[key] = source[key];
    }
  });

  return merged;
}
// 内置贴图路径映射（示例）